﻿
#region 程序集引用区
using System;
using System.Data;
using System.Linq;
using System.Linq.Expressions;
using SubSonic.DataProviders;
using SubSonic.Extensions;
using SubSonic.Linq.Structure;
using SubSonic.Query;
using SubSonic.Schema;
using System.Data.Common;
using System.Collections.Generic;
#endregion

namespace eTerm.MsSql.DbProvider {
    public sealed class Context {
        
        #region 变量定义
        private static readonly Context m_instance = new Context();
        private IQuerySurface dbProvider;
        #endregion

        #region 构造函数
        private Context() { 
            
        }

        public IQuerySurface DbProvider {
            set {
                dbProvider = value;
            }
            get {
                return dbProvider;
            }
        }
        
        /// <summary>
        /// 获取系统设置单一实例.
        /// </summary>
        /// <value>单一实例.</value>
        public static Context Instance { get { return m_instance; } }
        #endregion
        
        #region 属性定义
        /// <summary>
        /// 是否自动加载相关联的子类或父类.
        /// </summary>
        public bool AutoLoadRelation{
            get;set;
        }
        #endregion
    }
}

